<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCustomerCluesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('customer_clues', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('customer_name') ->default('')   ->comment('客户名称');
            $table->string('contact')       ->default('')   ->comment('联系方式');
            $table->string('province')      ->default('')   ->comment('省');
            $table->string('city')          ->default('')   ->comment('市');
            $table->string('area')          ->default('')   ->comment('区');
            $table->string('address')       ->default('')   ->comment('地址');
            $table->bigInteger('creator_id')->default(0)    ->comment('创建者');
            $table->tinyInteger('is_invalid')->default(0)   ->comment('是否无效');
            $table->tinyInteger('is_select') ->default(0)   ->comment('是否已被业务员选择');
            $table->string('remark')        ->default('')   ->comment('备注');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('customer_clues');
    }
}
